package com.lpf.json.fastjson.JSONField;

import java.io.IOException;
import java.lang.reflect.Type;

import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.ObjectSerializer;

public class UserIDValueSerializer implements ObjectSerializer {
	@Override
	public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException {
		//serializer:{"address":"杭州","phone":"18603396966","date":"20180125","sex":"男","ID":
		//object:100
		//fieldName:ID
		//fieldType:class java.lang.Long
		//features:0
		Long value = (Long) object;
		String text = value + "元";
		serializer.write(text);
	}
}